public class Test {
    public static void main(String[] args) {
        int preorder[]={1,2,3};
        int inorder[]={2,1,3};
        int postorder[]={2,3,1};
        BinaryTree binaryTree=new BinaryTree();
        BinaryTree.TreeNode root=binaryTree.buildChilidTree(preorder,inorder,0,preorder.length-1);
        binaryTree.postIndex=postorder.length-1;
        BinaryTree.TreeNode root1=binaryTree.buildChilidTree_(postorder,inorder,0,postorder.length-1);
        binaryTree.preorderTraversal(root);
        System.out.println("");
        binaryTree.inorderTraversal(root);
        System.out.println("");
        binaryTree.postorderTraversal(root);
        System.out.println(" ");
    }
}
